import java.util.Scanner;

/**
 *
 * 输入一个int型整数，按照从右向左的阅读顺序，返回一个不含重复数字的新的整数。
 *
 *
 *
 * @author: YuanChilde
 * @date: 2020-02-17 8:01
 * @version: 1.0
 * Modification History:
 * Date    Author      Version     Description
 * -----------------------------------------------------------------
 * 2020-02-17 8:01    YuanChilde     1.0        新增
 */
public class Demo11 {

    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String input = sc.nextLine();
        char ch;
        char done='*';
        for(int i =input.length()-1;i>=0;i--){
            ch = input.charAt(i);
            if(ch!=done){
                System.out.print(ch);
            }
            input =input.replace(ch,done);
        }
    }

}
